from auth.models import Profil, Team
from auth.forms import UserRegistrationForm

def user_created(sender, user, request, **kwargs):
#    form=UserRegistrationForm(request.POST)
    tmpProfil=Profil.objects.get(user=user)
    tmpProfil.user.first_name=request.POST['imie']
    tmpProfil.user.last_name=request.POST['nazwisko']
    tmpProfil.team=Team.objects.get(pk=request.POST['team'])
    tmpProfil.indeks=request.POST['indeks']
    tmpProfil.user.save()
    tmpProfil.save()
    
from registration.signals import user_registered
user_registered.connect(user_created)

#tutaj jest przyczyna calego bledu, w wyciaganiu danych z POST